/*
 * @Description: 
 * @Author: Zilu
 * @Date: 2021-11-13 22:33:14
 * @Version: 
 * @LastEditTime: 2021-11-13 22:53:56
 * @LastEditors: Zilu
 */
// fgets1.c 使用 fgets() 和 fputs()
#include <stdio.h>
#define STLEN 14

int main(int argc, char const *argv[])
{
    char words[STLEN];

    puts("Enter a string, please.");    
    fgets(words, STLEN, stdin);
    printf("Your string twice (puts(), then fputs()):\n");
    puts(words);                //puts() 函数自动添加换行
    fputs(words, stdout);
    puts("Enter another string, please.");
    fgets(words, STLEN, stdin);    
    printf("Your string twice (puts(), then fputs()):\n");
    puts(words);
    fputs(words, stdout);
    puts("Done.");

    return 0;
}


